package com.leigang.boot.websocket.untils;

import java.util.HashMap;
import java.util.Map;

/**
 * @author leigang
 */
public class ResponseUtils {

    public static Map<String, Object> success(Object object){
        Map<String, Object> map  = new HashMap<>(4);
        map.put("code","200");
        map.put("message","成功");
        map.put("data",object);
        return map;
    }


    public static Map<String, Object> error(Object object){
        Map<String, Object> map  = new HashMap<>(4);
        map.put("code","500");
        map.put("message","失败");
        map.put("data",object);
        return map;
    }
}
